package com.xf.lastmall.service.impl;


import com.xf.lastmall.moudle.entity.OrderInvoiceEntity;
import com.xf.lastmall.repository.OrderInvoiceRepository;
import com.xf.lastmall.service.OrderInvoiceService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;


@Service
public class OrderInvoiceServiceImpl implements OrderInvoiceService {
    @Resource
    private OrderInvoiceRepository orderInvoiceRepository;

    @Override
    public void insert(OrderInvoiceEntity entity) {
        orderInvoiceRepository.save(entity);
    }

    @Override
    public int update(OrderInvoiceEntity entity) {
        OrderInvoiceEntity save = orderInvoiceRepository.save(entity);
        return 0;
    }

    @Override
    public OrderInvoiceEntity findByOrderNo(String orderNo) {
        return orderInvoiceRepository.findByOrderNo(orderNo);
    }
}
